Release 10.1A: OpenEdge Development:
Debugging and Troubleshooting
Query plan
The query plan contains the following information about how OpenEdge extracts information for the query:
- Procedure name and line number where the query started:
- Query ID, the query's unique identifier.
- For statically and dynamically opened queries, a string representation of the query handle, and the name of the query (if available).
- Whether the query is a
FORstatement, a staticPRESELECTstatement, a statically opened query, or dynamically opened query.- For dynamically opened queries, the
PREPARE-STRING.- When the query was prepared:
- Whether the client is performing sorting.
- Whether this is a
SCROLLINGquery, and whether it usesINDEXED-REPOSITION.- Table and index information for each table used in the query. The index information that Query Info logging provides, such as the
INDEX-INFORMATIONattribute of the query object handle, is already available within the 4GL. To get more complete index information, useCOMPILE XREF. For more information on indices, see "Identifying indices" section.- Whether the query uses
PRESELECT. Using thePRESELECTkeyword in a dynamically opened query has the same effect as the staticPRESELECT, that is, it builds a preselected list of records.- The time it takes to prepare dynamically opened queries.
OpenEdge logs and collates query plan information at specific times, based on query type, as follows:
- On a
FORstatement, after the top of theFORstatement block executes.- On a statically opened query, after the
OPEN QUERYstatement executes.- On a dynamically opened query, after the
QUERY-PREPARE()method of the query handle executes.- On the static
PRESELECTstatement, after the top of theREPEAT | DO PRESELECTblock executes.Identifying indices
Query Info logging identifies single and multiple index brackets used by the query engine for
Note: When using dataservers, the logged index behavior may not accurately reflect the indices used to resolve the query against the non-Progress database. For more information, see OpenEdge Getting Started: Database Essentials .FORandPRESELECTstatements. It also identifies indices for dynamic and static queries that use multiple index brackets. Selected indices will display in a comma-separated list in the Query Plan.For the following FOR EACH statement:
Query Info logging produces the following Query Plan:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |